// 全局路由拦截器
export default defineNuxtRouteMiddleware((to, from) => {
  // NProgress.start();

  if (import.meta.server) {
  } else {
    const userAgent = navigator.userAgent;
    const isDevice =
      /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|HUAWEI)/i;
    if (isDevice.test(userAgent)) {
      // 跳转到移动端页面
    } else {
      // 跳转到PC端页面
    }
  }
});
